package com.yipinhouse.reception.client;

import com.yipinhouse.common.result.Result;
import com.yipinhouse.reception.client.param.RegisterWebParam;
import com.yipinhouse.reception.client.param.UpdateInfoWebParam;
import com.yipinhouse.user.client.param.RegisterParam;
import com.yipinhouse.user.client.param.UpdateInfoParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

@FeignClient(contextId = "userWebManageClient", name = "reception", path = "reception")
public interface UserWebManageClient {


    /**
     * 用户账号注册
     *
     * @param registerParam
     * @return
     */
    @PostMapping("register")
    public Result register(@RequestBody RegisterWebParam registerParam);

    /**
     * 发送短信验证码
     *
     * @return
     */
    @GetMapping("note")
    public Result note(@RequestParam("phone") Long phone);

    /**
     * 模拟发送验证码
     *
     * @param tel
     * @return
     */
    @GetMapping("noteTest")
    public Result noteTest(@RequestParam("tel") Long tel);

    /**
     * 修改个人信息与实名认证
     *
     * @return
     */
    @PostMapping("updateInfo")
    public Result updateInfo(@RequestBody UpdateInfoWebParam param);

//    /**
//     * 上传头像
//     *
//     * @param file
//     * @return
//     */
//    @PostMapping("upHeadphoto")
//    public Result upHeadphoto(@RequestBody MultipartFile file) throws Exception;

}
